<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>登录界面</title>
    <link rel="icon" href="${pageContext.request.contextPath}/pages/favicon.ico" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="${pageContext.request.contextPath}/pages/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/pages/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/pages/css/style.min.css" rel="stylesheet">
    <style>
        body {
            display: -webkit-box;
            display: flex;
            -webkit-box-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            align-items: center;
            height: 100%;
        }
        .login-box {
            display: table;
            table-layout: fixed;
            overflow: hidden;
            max-width: 700px;
        }
        .login-left {
            display: table-cell;
            position: relative;
            margin-bottom: 0;
            border-width: 0;
            padding: 45px;
        }
        .login-left .form-group:last-child {
            margin-bottom: 0px;
        }
        .login-right {
            display: table-cell;
            position: relative;
            margin-bottom: 0;
            border-width: 0;
            padding: 45px;
            width: 50%;
            max-width: 50%;
            background: #67b26f!important;
            background: -moz-linear-gradient(45deg,#67b26f 0,#4ca2cd 100%)!important;
            background: -webkit-linear-gradient(45deg,#67b26f 0,#4ca2cd 100%)!important;
            background: linear-gradient(45deg,#67b26f 0,#4ca2cd 100%)!important;
            filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#67b26f', endColorstr='#4ca2cd', GradientType=1 )!important;
        }
        .login-box .has-feedback.feedback-left .form-control {
            padding-left: 38px;
            padding-right: 12px;
        }
        .login-box .has-feedback.feedback-left .form-control-feedback {
            left: 0;
            right: auto;
            width: 38px;
            height: 38px;
            line-height: 38px;
            z-index: 4;
            color: #dcdcdc;
        }
        .login-box .has-feedback.feedback-left.row .form-control-feedback {
            left: 15px;
        }
        @media (max-width: 576px) {
            .login-right {
                display: none;
            }
        }
    </style>
</head>
<body style="background-image: url(${pageContext.request.contextPath}/pages/images/login-bg-2.jpg); background-size: cover;">
<div class="bg-translucent p-10">
    <div class="login-box bg-white clearfix">
        <div class="login-left">
            <form action="${pageContext.request.contextPath}/user/checkUser" method="post">
                <div class="form-group has-feedback feedback-left">
                    <input type="text" placeholder="请输入您的账号" class="form-control" name="userAccount" id="userAccount" />
                    <span class="mdi mdi-account form-control-feedback" aria-hidden="true"></span>
                </div>
                <div class="form-group has-feedback feedback-left">
                    <input type="password" placeholder="请输入密码" class="form-control" id="userPassword" name="userPassword" />
                    <span class="mdi mdi-lock form-control-feedback" aria-hidden="true"></span>
                    <p style="color: red">${error}</p>
                </div>
<%--                <div class="form-group">--%>
<%--                    <label class="lyear-checkbox checkbox-primary m-t-10">--%>
<%--                        <input type="checkbox"><span>5天内自动登录</span>--%>
<%--                    </label>--%>
<%--                </div>--%>
                <div class="form-group">
                    <button class="btn btn-block btn-primary" type="submit" id="loginButton">立即登录</button>
                </div>
            </form>
        </div>
        <div class="login-right">
            <img src="${pageContext.request.contextPath}/pages/images/logo(1).png">
            <p style="	width: 124px;height: 41px;font-family: AppleSystemUIFont;font-size: 31px;font-weight: normal;font-stretch: normal;line-height: 41px;letter-spacing: 0px;color: #ffffff;">健康药柜</p>
            <p class="text-white m-tb-15">健康药柜是一个基于微信小程序和ssm框架的自动售卖机.</p>
            <p class="text-white">Copyright © 2020 <a href="https://gitee.com/WebItemOfDE/web-vending-machine">自动售卖机</a>. All right reserved</p>
        </div>
    </div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/pages/js/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/pages/js/bootstrap.min.js"></script>
<script>
    <%--'use strict'--%>
    <%--window.onload=function () {--%>
    <%--    $('#loginButton').click(function () {--%>
    <%--        let account = $('#userAccount').val();--%>
    <%--        let password = $('#userPassword').val();--%>
    <%--        let  data={"account" : account,"password":password};--%>
    <%--        &lt;%&ndash;$.post({&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    url:"${pageContext.request.contextPath}/User/checkUser",&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    dataType:'json',&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    data:data,&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    success:function () {&ndash;%&gt;--%>
    <%--        &lt;%&ndash;        alert(123);&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    }&ndash;%&gt;--%>
    <%--        &lt;%&ndash;})&ndash;%&gt;--%>
    <%--        &lt;%&ndash;$.ajax({&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    url:"${pageContext.request.contextPath}/User/checkUser",&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    type:"GET",&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    dataType:'text',&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    success:function () {&ndash;%&gt;--%>
    <%--        &lt;%&ndash;        alert(123)&ndash;%&gt;--%>
    <%--        &lt;%&ndash;        window.location.href="${pageContext.request.contextPath}/User/toLogin";&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    },&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    error:function (arg1) {&ndash;%&gt;--%>
    <%--        &lt;%&ndash;       console.log(arg1)&ndash;%&gt;--%>
    <%--        &lt;%&ndash;    }&ndash;%&gt;--%>
    <%--        &lt;%&ndash;})&ndash;%&gt;--%>
    <%--    })--%>
    <%--}--%>
</script>
</body>
</html>
